package com.fight.strive.sys.modules.scheduler.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fight.strive.sys.modules.common.BaseEntity;
import com.fight.strive.sys.modules.validator.StriveNotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Entity(name = "t_sys_sch_executor")
@TableName("t_sys_sch_executor")
public class SchExecutorEntity extends BaseEntity {

    /**
     * 服务端唯一标识
     */
    @Column(unique = true)
    @StriveNotBlank(msg = "执行器代码不能为空")
    private String code;

    /**
     * 服务端名称
     */
    @StriveNotBlank(msg = "执行器名称不能为空")
    private String name;

    /**
     * 服务端地址前缀，多个以逗号分隔，轮询调度
     */
    @StriveNotBlank(msg = "执行器地址不能为空")
    private String url;

}
